//
//  TKIMFileUpDownManager.h
//  TKIM
//
//  Created by liupm on 15/11/12.
//  Copyright © 2015年 liupm. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "TKIMFileUpDownProtocol.h"
#import "TKIMFileUpload.h"

@interface TKIMFileUpDownManager : NSObject

/**
 *  @Author lpm, 15-10-24 21:10:39
 *
 *  @brief  上传图片
 *
 *  @param urlStr   图片地址
 *  @param image     图片
 *  @param param    参数
 *  @param fileName 文件名
 *  @param complete 上传成功
 *  @param process  上传中
 *  @param fail     上传失败
 */
- (void)uploadImageWithURL:(NSString *)urlStr image:(UIImage *)image param:(NSMutableDictionary *)param fileName:(NSString *)fileName complete:(FileUplDownLoadSuccess )complete process:(FileUpDownloadUploading) process fail:(FileUpDownloadUploadFail)fail;


/**
 *  @Author lpm, 15-10-24 21:10:39
 *
 *  @brief  上传文件
 *
 *  @param urlStr   地址
 *  @param data     数据
 *  @param MimeType    类型
 *  @param fileName 文件名
 *  @param complete 上传成功
 *  @param process  上传中
 *  @param fail     上传失败
 */
- (void)uploadFileWithURL:(NSString *)urlStr data:(NSData *)data mimeType:(TKIMFileUploadMimeType)mimeType fileName:(NSString *)fileName extParams:(NSArray<TKIMFileUploadModel *> *)extParams complete:(FileUplDownLoadSuccess )complete process:(FileUpDownloadUploading) process fail:(FileUpDownloadUploadFail)fail;



/**
 *  @Author lpm, 15-11-02 12:11:23
 *
 *  @brief  下载图片
 *
 *  @param urlStr
 *  @param complete
 *  @param process
 *  @param fail
 */
- (void)downloadImageWithURL:(NSString *)urlStr fileName:(NSString *)fileName  complete:(FileUplDownLoadSuccess )complete process:(FileUpDownloadUploading) process fail:(FileUpDownloadUploadFail)fail;


/**
 *  @Author lpm, 17-08-15 11:08:47
 *
 *  @brief  下载文件
 *
 *  @param urlStr   文件下载地址
 *  @param fileName 文件名
 *  @param suffix   后缀
 *  @param complete 完成回调
 *  @param process  进度回调
 *  @param fail     失败回调
 *
 *  @return
 */
- (void)downloadFileWithURL:(NSString *)urlStr fileName:(NSString *)fileName suffix:(NSString *)suffix   complete:(FileUplDownLoadSuccess )complete process:(FileUpDownloadUploading) process fail:(FileUpDownloadUploadFail)fail;


/**
 *  @Author lpm, 17-08-15 11:08:47
 *
 *  @brief  下载文件
 *
 *  @param urlStr   文件下载地址
 *  @param suffix   存储路径
 *  @param fileName 文件名
 *  @param suffix   后缀
 *  @param extendedAttributes   额外属性
 *  @param complete 完成回调
 *  @param process  进度回调
 *  @param fail     失败回调
 *
 *  @return
 */
- (void)downloadFileWithURL:(NSString *)urlStr storagePath:(NSString *)storagePath fileName:(NSString *)fileName suffix:(NSString *)suffix  extendedAttributes:(NSDictionary *)extendedAttributes complete:(FileUplDownLoadSuccess )complete process:(FileUpDownloadUploading) process fail:(FileUpDownloadUploadFail)fail;


/**
 *  @Author lpm, 15-12-16 11:12:07
 *
 *  @brief  取消所有请求
 */
-(void)cancelAllRequets;
@end
